# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=gx
pkgver=0.14.3
pkgrel=25
pkgdesc="Packaging tool build around the distributed, content addressed filesystem IPFS"
url="https://github.com/whyrusleeping/gx"
arch="all"
license="MIT"
options="!check net" # Test suite issues
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/whyrusleeping/gx/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

prepare() {
	default_prepare
	go mod download
}

build() {
	make
}

package() {
	install -Dm 755 gx "$pkgdir/usr/bin/gx"
	install -Dm 644 -t "$pkgdir/usr/share/licenses/gx" LICENSE
}

sha512sums="
14280680254aea69b1295e625788b39404a77defdcdd47399529ee818695965c06c6001de8adb0a44f641e66f9386ca9da3fc2c56a038c4b96a8ddd6252c3d49  gx-0.14.3.tar.gz
"
